using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._ServerTools._Caching
{
    /// <summary>
    /// <para>Manage Map Server Cache Status</para>
    /// <para>Manages internal data kept by the server about the built tiles in a map or image service cache.</para>
    /// <para>管理服务器保存的有关地图或影像服务缓存中已构建切片的内部数据。</para>
    /// </summary>    
    [DisplayName("Manage Map Server Cache Status")]
    public class ManageMapServerCacheStatus : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ManageMapServerCacheStatus()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_input_service">
        /// <para>Input Service</para>
        /// <para>The map image layer for which the cache status will be modified.. You can choose it by browsing to the desired service in Portal or you can drag and drop a web tile layer from the Catalog pane Portal tab to supply this parameter.</para>
        /// <para>将修改其缓存状态的地图图像图层。您可以通过在 Portal 中浏览至所需服务来选择该服务，也可以从目录窗格门户选项卡中拖放 Web 切片图层以提供此参数。</para>
        /// </param>
        /// <param name="_manage_mode">
        /// <para>Manage Mode</para>
        /// <para><xdoc>
        ///   <bulletList>
        ///     <bullet_item>Delete cache status—Deletes the status information used by the server.</bullet_item><para/>
        ///     <bullet_item>Rebuild cache status—Deletes, then rebuilds the status information used by the server.</bullet_item><para/>
        ///     <bullet_item>Rebuild bundle status—Creates status information in a new file geodatabase named Status.gdb in a folder you specify in the Output Folder parameter. This option is used when you want to create a custom status report for a particular area of interest or set of scales.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <bulletList>
        ///     <bullet_item>删除缓存状态 - 删除服务器使用的状态信息。</bullet_item><para/>
        ///     <bullet_item>重建缓存状态 - 删除，然后重建服务器使用的状态信息。</bullet_item><para/>
        ///     <bullet_item>重新构建包状态 - 在输出文件夹参数中指定的文件夹中名为 Status.gdb 的新文件地理数据库中创建状态信息。当您要为特定感兴趣区域或一组比例创建自定义状态报告时，将使用此选项。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        public ManageMapServerCacheStatus(object _input_service, _manage_mode_value _manage_mode)
        {
            this._input_service = _input_service;
            this._manage_mode = _manage_mode;
        }
        public override string ToolboxName => "Server Tools";

        public override string ToolName => "Manage Map Server Cache Status";

        public override string CallName => "server.ManageMapServerCacheStatus";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_input_service, _manage_mode.GetGPValue(), _scales, _num_of_caching_service_instances, _report_folder, _area_of_interest, _report_extent, _output_folder];

        /// <summary>
        /// <para>Input Service</para>
        /// <para>The map image layer for which the cache status will be modified.. You can choose it by browsing to the desired service in Portal or you can drag and drop a web tile layer from the Catalog pane Portal tab to supply this parameter.</para>
        /// <para>将修改其缓存状态的地图图像图层。您可以通过在 Portal 中浏览至所需服务来选择该服务，也可以从目录窗格门户选项卡中拖放 Web 切片图层以提供此参数。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Service")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _input_service { get; set; }


        /// <summary>
        /// <para>Manage Mode</para>
        /// <para><xdoc>
        ///   <bulletList>
        ///     <bullet_item>Delete cache status—Deletes the status information used by the server.</bullet_item><para/>
        ///     <bullet_item>Rebuild cache status—Deletes, then rebuilds the status information used by the server.</bullet_item><para/>
        ///     <bullet_item>Rebuild bundle status—Creates status information in a new file geodatabase named Status.gdb in a folder you specify in the Output Folder parameter. This option is used when you want to create a custom status report for a particular area of interest or set of scales.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <bulletList>
        ///     <bullet_item>删除缓存状态 - 删除服务器使用的状态信息。</bullet_item><para/>
        ///     <bullet_item>重建缓存状态 - 删除，然后重建服务器使用的状态信息。</bullet_item><para/>
        ///     <bullet_item>重新构建包状态 - 在输出文件夹参数中指定的文件夹中名为 Status.gdb 的新文件地理数据库中创建状态信息。当您要为特定感兴趣区域或一组比例创建自定义状态报告时，将使用此选项。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Manage Mode")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _manage_mode_value _manage_mode { get; set; }

        public enum _manage_mode_value
        {
            /// <summary>
            /// <para>Rebuild cache status</para>
            /// <para>Rebuild cache status—Deletes, then rebuilds the status information used by the server.</para>
            /// <para>重建缓存状态 - 删除，然后重建服务器使用的状态信息。</para>
            /// </summary>
            [Description("Rebuild cache status")]
            [GPEnumValue("REBUILD_CACHE_STATUS")]
            _REBUILD_CACHE_STATUS,

            /// <summary>
            /// <para>Delete cache status</para>
            /// <para>Delete cache status—Deletes the status information used by the server.</para>
            /// <para>删除缓存状态 - 删除服务器使用的状态信息。</para>
            /// </summary>
            [Description("Delete cache status")]
            [GPEnumValue("DELETE_CACHE_STATUS")]
            _DELETE_CACHE_STATUS,

            /// <summary>
            /// <para>Rebuild bundle status</para>
            /// <para>Rebuild bundle status—Creates status information in a new file geodatabase named Status.gdb in a folder you specify in the Output Folder parameter. This option is used when you want to create a custom status report for a particular area of interest or set of scales.</para>
            /// <para>重新构建包状态 - 在输出文件夹参数中指定的文件夹中名为 Status.gdb 的新文件地理数据库中创建状态信息。当您要为特定感兴趣区域或一组比例创建自定义状态报告时，将使用此选项。</para>
            /// </summary>
            [Description("Rebuild bundle status")]
            [GPEnumValue("REPORT_BUNDLE_STATUS")]
            _REPORT_BUNDLE_STATUS,

        }

        /// <summary>
        /// <para>Scales</para>
        /// <para>The scale levels for which the status will be modified. This parameter is only applicable when building a custom status using the Rebuild bundle status option for the Manage Mode parameter.</para>
        /// <para>将修改其状态的比例级别。仅当使用“管理模式”参数的“重新构建捆绑包状态”选项构建自定义状态时，此参数才适用。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Scales")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _scales { get; set; } = null;


        /// <summary>
        /// <para>Number of caching service instances</para>
        /// <para>Defines the number of instances that will be used to update/generate the tiles. The value for this parameter is set to unlimited (-1) and cannot be modified.</para>
        /// <para>定义将用于更新/生成切片的实例数。此参数的值设置为无限制 （-1），无法修改。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Number of caching service instances")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long? _num_of_caching_service_instances { get; set; } = null;


        /// <summary>
        /// <para>Output Folder</para>
        /// <para>Output folder for the Status.gdb. This parameter is only applicable when building a custom status using the Rebuild bundle status option.</para>
        /// <para>Status.gdb 的输出文件夹。此参数仅在使用 Rebuild bundle status 选项构建自定义状态时适用。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Folder")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _report_folder { get; set; } = null;


        /// <summary>
        /// <para>Area Of Interest</para>
        /// <para>An area of interest (polygon) that determines what geography the status report will cover. This parameter is only applicable when building a custom status using the Rebuild bundle status option.</para>
        /// <para>感兴趣区域（面），用于确定状态报告将涵盖的地理位置。此参数仅在使用 Rebuild bundle status 选项构建自定义状态时适用。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Area Of Interest")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _area_of_interest { get; set; } = null;


        /// <summary>
        /// <para>Report Extent</para>
        /// <para><xdoc>
        ///   <para>A rectangular extent defining the area for which the status will be built. This parameter is only applicable when building a custom status using the Rebuild bundle status option.</para>
        ///   <para>Note that the Area Of Interest parameter allows you to specify an area of interest that is nonrectangular.</para>
        ///   <bulletList>
        ///     <bullet_item>Default—The extent will be based on the maximum extent of all participating inputs. This is the default.</bullet_item><para/>
        ///     <bullet_item>Current Display Extent—The extent is equal to the data frame or visible display. The option is not available when there is no active map.</bullet_item><para/>
        ///     <bullet_item>As Specified Below—The extent will be based on the minimum and maximum extent values specified.</bullet_item><para/>
        ///     <bullet_item>Browse—The extent will be based on an existing dataset.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>定义将为其构建状态的区域的矩形范围。此参数仅在使用 Rebuild bundle status 选项构建自定义状态时适用。</para>
        ///   <para>请注意，“感兴趣区域”参数允许您指定非矩形的感兴趣区域。</para>
        ///   <bulletList>
        ///     <bullet_item>默认值 - 范围将基于所有参与输入的最大范围。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>当前显示范围 - 范围等于数据框或可见显示。当没有活动地图时，该选项不可用。</bullet_item><para/>
        ///     <bullet_item>如下所述 - 范围将基于指定的最小和最大范围值。</bullet_item><para/>
        ///     <bullet_item>浏览 - 范围将基于现有数据集。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Report Extent")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _report_extent { get; set; } = null;


        /// <summary>
        /// <para>Output Map Service URL</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Map Service URL")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _output_folder { get; set; }


        public ManageMapServerCacheStatus SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}